const Mock = require("mockjs");
const mongoose = require("mongoose");
require("../db/model/students.js");


let {students} = Mock.mock({
    "students|100": [{
        "name": "@cname()",
        "age|18-22": 1,
        "gender|1": ["男", "女"],
        "address": "@county(true)",
        "gradles|1":['F76','F77','F78']
    }]
});

mongoose.connect("mongodb://localhost:27017/F78", async () => {
    console.log(" 连接成功！");
    const studentsModel = mongoose.model("students");
    const data = await studentsModel.create(students);
    console.log(data);
});



module.export = { students };
